{extend name="public/common"} {block name="body"}
<title>基本设置</title>
</head>
<style type="text/css">
	table tbody {
		display:block;
		height:650px;
		overflow-y:scroll;
		}
		
	table thead, tbody tr {
		display:table;
		width:100%;
		table-layout:fixed;
		}
		
	table thead {
		width: calc( 99.87% - 1em )
		}
</style>
<body>
  <nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i>
   
   注单管理
    <span class="c-gray en">&gt;</span>
    返水派送
    <a class="btn btn-success radius r"
      style="line-height: 1.6em; margin-top: 3px"
      href="javascript:location.replace(location.href);" title="刷新">
      <i class="Hui-iconfont">&#xe68f;</i>
    </a>
  </nav>
  
  <div style="padding:20px;height:30px;">
  	
  	<div class="new_box">
  <form action="" enctype="application/x-www-form-urlencoded" method="post" style="margin-left:20px;">
  <div class="text-c" style="padding :20px 0;float: left!important;min-width: 945px;">
    
     &nbsp;&nbsp;&nbsp;&nbsp;从：
    <input type="text" name="sDate1" value="{$param.sDate1|date="Y-m-d H:i",###}" id="sDate1" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd H:m',minDate:$('#logmin').val()})" id="logmin" class="input-text Wdate" style="width:150px;">
     到：
    <input type="text" onfocus="WdatePicker({dateFmt: 'yyyy-M-d H:m',minDate:$('#sDate1').val()})" name="sDate2" value="{$param.sDate2|date="Y-m-d H:i",###}"  id="sDate2"  class="input-text Wdate" style="width:150px;margin-right:15px;">
    <input type="text" name="us_sql" value="{:input('post.us_sql') ? $us_sql : ''}" placeholder=" 会员名称" style="width:150px" class="input-text">
    <div class="radio-box">
		<input name="desc" type="radio" id="sex-1" value="1" checked>
		<label for="sex-1">按有效投注</label>
	</div>
    <button class="btn btn-success" name="submit" type="submit" value="1" style="margin-right:20px;"><i class="Hui-iconfont">&#xe665;</i> 开始计算</button>
    <button class="btn btn-success" name="submit2" type="submit" value="2" style="margin-right:20px;"><i class="Hui-iconfont">&#xe603;</i> 确认派送</button>
  
  </div>
  
  <div class="page-container  dataTables_wrapper">
      <div id="tab-system" class="HuiTab">
        <div class="tabCon">
          <div class="mt-20">
            <table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
              <thead>
                <tr class="text-c">
                <th><input type="checkbox" id="dj"></th>
                <th>会员账号</th>
                <th>会员等级</th>
                <th>返水比例（<a href="/admin/Member/usclass_list">比例设置</a>）</th>
                <th>投注金额<p style="margin-bottom: 0;">当前页投注总金额（<span id="tzje"></span>）</p></th>
                <th>中奖金额<p style="margin-bottom: 0;">当前页中奖总金额（<span id="zjje"></span>）</p></th>
                <th>返水金额<p style="margin-bottom: 0;">当前页返水总金额（<span id="fsje"></span>）</p></th>
                </tr>
              <tbody>
             {volist name="list" id="item"}
                <tr class="text-c">
                	<td><input type="checkbox" value="{$item.username}" id="user" name="user[]"></td>
                	<td>{$item.username}</td>
                	<td>{$item.class_name}</td>
                	<td>{$item.fsbl}%</td>
                	<td class="tzje">{$item.tzje}</td>
                	<td class="zjje">{$item.zjje}</td>
                	<td class="fsje">{:round($item.tzje/100*$item.fsbl,2)}</td>
                </tr>
                {/volist}
              </tbody>
            </table>
          </div>
        </div>
      </div>
      
  </div>
  </form>
  </div>
      
  </div>
{/block}

{block name="js"}
  <script type="text/javascript" src="__SYSMET__/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
  <script type="text/javascript">
  $(function(){
      var tzje=0;
      var zjje=0;
      var fsje=0;
      $(".text-c").each(function(){
    	  tzje += Number($(this).find(".tzje").text());
    	  zjje += Number($(this).find(".zjje").text());
    	  fsje += Number($(this).find(".fsje").text());
      })
      $("#tzje").text(tzje.toFixed(2));
      $("#zjje").text(zjje.toFixed(2));
      $("#fsje").text(fsje.toFixed(2));
  });
  $("#dj").click(function(){
		if($("#dj").is(":checked")){
			$(".text-c tr td #user").prop("checked",true);
		}else{
			$(".text-c tr td #user").prop("checked",false);
		}
	})
    $(function() {
      $('.skin-minimal input').iCheck({
        checkboxClass : 'icheckbox-blue',
        radioClass : 'iradio-blue',
        increaseArea : '20%'
      });
      $("#tab-system").Huitab({
        index : 0
      });
    });
    
</script>

{/block}
